﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Sina Weibo 学习</title>
    <link href="Styles/Site.css" rel="Stylesheet"  type="text/css" />
    <script type="text/javascript" src="http://js.wcdn.cn/t3/platform/js/api/wb.js" charset="utf-8" ></script>
    <script type="text/javascript" src="Scripts/jquery-1.4.1.min.js" charset="utf-8" ></script>
</head>
<body>
    <h2>欢迎使用SinaWeiboApi</h2>
    <br />
    信息展示：<label id="informationDisplay"></label>
    <p>
        <input type="button" id="checkLogBtn" value="检测是否登录" />
        <input type="button" id="logBtn" value="登录" />
    </p>
</body>
<script type="text/javascript">
    WB.core.load(['connect', 'client'], function () {
        var cfg = {
            key: '2055634842',
            xdpath: 'xd.html'
        };
        WB.connect.init(cfg);
        WB.client.init(cfg);
    }); 
</script>
<script type="text/javascript">
    $(document).ready(function () {
        //alert("ssssssssssssss");
        $("#checkLogBtn").click(function () {
            //alert("ssssssssssssss");
            var isSuccessful = WB.connect.checkLogin();
            $("#informationDisplay").text(isSuccessful);
        });

        $("#logBtn").click(function () {
            WB.connect.login(function () {
                //callBack function 
            });
        });
    })
</script>
</html>
